package androidx.appcompat.widget;

import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RatingBar;
import o.ah.c;
import o.cg;

public class AppCompatRatingBar extends RatingBar {
    private final cg ˏ;

    public AppCompatRatingBar(Context context) {
        this(context, null);
    }

    public AppCompatRatingBar(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, c.ˋˋ);
    }

    public AppCompatRatingBar(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.ˏ = new cg(this);
        this.ˏ.ˎ(attributeSet, i);
    }

    protected synchronized void onMeasure(int i, int i2) {
        super.onMeasure(i, i2);
        Bitmap ॱ = this.ˏ.ॱ();
        if (ॱ != null) {
            setMeasuredDimension(View.resolveSizeAndState(ॱ.getWidth() * getNumStars(), i, 0), getMeasuredHeight());
        }
    }
}
